//使用百川sdk直接打开相关页面
function openItem( type ){
  switch (type) {
    case 'detail'://商品详情页面
    aliBC.showDetailPage({
      itemId:'538305806846',
      pid:'',
      openType:'h5'//'auto','h5','native'
    },function(ret,err){
      //购买商品的回调
      console.log(type+'--'+JSON.stringify(ret));
    });
    break;
    case 'addcart'://加入购物车页面
    aliBC.showAddCartPage({
      itemId:'538305806846',
      pid:'',
      openType:'h5'//'auto','h5','native'
    },function(ret,err){
      //购买商品or加入购物车的回调
      console.log(type+'--'+JSON.stringify(ret));
    });
    break;
    case 'myorders'://我的订单页面
    aliBC.showMyOrders({
      orderStatus:0,
      allOrder:false,
      pid:'',
      openType:'h5'//'auto','h5','native'
    },function(ret,err){
      //购买商品的回调
      console.log(type+'--'+JSON.stringify(ret));
    });
    break;
    case 'mycart'://我的购物车页面
    aliBC.showMyCarts({
      pid:'',
      openType:'h5'//'auto','h5','native'
    },function(ret,err){
      //购买商品的回调
      console.log(type+'--'+JSON.stringify(ret));
    });
    break;
    case 'shop'://店铺页面
    aliBC.showShopPage({
      shopId:'12333333',
      pid:'',
      openType:'h5'//'auto','h5','native'
    },function(ret,err){
      //购买商品的回调
      console.log(type+'--'+JSON.stringify(ret));
    });
    break;
    case 'url'://url页面
    aliBC.showPageByUrl({
      url:'https://uland.taobao.com/coupon/edetail?activityId=a5633c610f1f460f9401a69171e4f14e&itemId=538305806846&src=ujue_youju&nowake=1',
      pid:'',
      openType:'native'//'auto','h5','native'
    },function(ret,err){
      //购买商品的回调
      console.log(type+'--'+JSON.stringify(ret));
    });
    break;
    default:
  }
}
